/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.team1160.breakaway.camera;

import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.model.Model;
import com.team1160.breakaway.model.ModelNotifier;
import com.team1160.breakaway.util.Point2D;
import com.team1160.breakaway.util.Point2DDouble;

/**
 *
 * @author CJ
 */
public class Cam_Drive implements ModelNotifier{
    
    Targetting targetComp;

    public Cam_Drive(Targetting targetComp)
    {
        this.targetComp = targetComp;
    }

    public void updateModel(Model model){
        updateCamTarget(model);
    }

    public void updateCamTarget(Model model)
    {
        Point2D center = this.targetComp.getCenter();
        Point2DDouble normCtr = this.targetComp.getNormalizedCenter();

        model.setTargetCenter(center);
        model.setNormalizedTargetCenter(normCtr);
    }
}
